added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSASPNETMVCDataView / Views / Person / Index.aspx
blob7de50a7630af55fc17556666930a8b1eae87dbcf
1 <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CSASPNETMVCDataView.Models.Person>>" %>
3 <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
4         Index
5 </asp:Content>
7 <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
9     <h2>Index</h2>
11     <table>
12         <tr>
13             <th></th>
14             <th>
15                 Id
16             </th>
17             <th>
18                 Name
19             </th>
20             <th>
21                 Age
22             </th>
23             <th>
24                 Phone
25             </th>
26             <th>
27                 Email
28             </th>
29         </tr>
31     <% foreach (var item in Model) { %>
32     
33         <tr>
34             <td>
35                 <%= Html.ActionLink("Edit", "Edit", new { id=item.Id }) %> |
36                 <%= Html.ActionLink("Details", "Details", item )%> |
37                 <%= Html.ActionLink("Delete", "Delete", new { id=item.Id })%>
38             </td>
39             <td>
40                 <%= Html.Encode(item.Id) %>
41             </td>
42             <td>
43                 <%= Html.Encode(item.Name) %>
44             </td>
45             <td>
46                 <%= Html.Encode(item.Age) %>
47             </td>
48             <td>
49                 <%= Html.Encode(item.Phone) %>
50             </td>
51             <td>
52                 <%= Html.Encode(item.Email) %>
53             </td>
54         </tr>
55     
56     <% } %>
58     </table>
60     <p>
61         <%= Html.ActionLink("Create New", "Create") %>
62     </p>
64 </asp:Content>